home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15964 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  725 b 

  1. Path: senator-bedfellow.mit.edu!usenet
  2. From: Darrel K Robertson <dkr1@MIT.EDU>
  3. Newsgroups: comp.lang.c++
  4. Subject: new with multidimensional arrays
  5. Date: Mon, 08 Apr 1996 21:13:39 -0400
  6. Organization: Massachusetts Institute of Technology
  7. Message-ID: <3169B9C3.2A10@MIT.EDU>
  8. NNTP-Posting-Host: m11-113-8.mit.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.3 sun4m)
  13.  
  14. Hi, I wonder if anyone can help me. I want to use "new" to create a 
  15. multidimensional array, but don't know how. So far I have:
  16. complex *grid;
  17. scanf("%d %d", &nc, &nr);
  18. grid = new complex[nc][nr];
  19.  
  20. Unfortunately this won't work. Any info would be much appreciated.
  21. Darrel.
  22.